package com.atguigu.day17.work2;

public class Work5 {
    public static void main(String[] args) {
        double num=Math.random()*100;
        System.out.println("随机数:"+num);
        String str=num+"";
        str=str.substring(0,str.indexOf(".")+3);
        System.out.println(str);
    }
}
